package com.baidu.foody.data.remote

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

/**
 * 获取FoodApi实现类对象
 * 由Retrofit2自动实现，不需要我们去实现 类似于Room的Dao
 */
object FoodApiInstance {
    private val retrofit = Retrofit.Builder()
        .baseUrl(NetworkConstants.BASE_URL)
        .addConverterFactory(GsonConverterFactory.create())
        .build()

    val foodApi: FoodApi = retrofit.create(FoodApi::class.java)
}